import { minifetch } from "./request"

const getBannerApi = (data) =>{
	return minifetch.post("v1/getBanner", data)
}
const oneClickLoginApi = (data) =>{
	return minifetch.post('v1/miniLoginV2', data)
}
const getUserInfoApi = () =>{
	return minifetch.post("v1/user/userInfo")
}
const getMySelfApi = (params) =>{
	return minifetch.post("v2/pep/myShelf", {...params})
}
const getGradeListApi = () =>{
	return minifetch.post("v2/pep/gradeList")
}
const getCourseListApi = () =>{
	return minifetch.post("v2/pep/courseList")
}
const getYunDuoBookListApi = (params) =>{
	return minifetch.post("v2/pep/booksList", {...params}, {}, true)
}
const addYunDuoBookApi = (params) =>{
	return minifetch.post("v2/pep/addShelf", {...params})
}
const getPayBookInfoApi = (params) =>{
	return minifetch.post("v2/pep/getMemberCard", {...params})
}
const buyBookApi = (params) =>{
	return minifetch.post("v2/pep/buy", {...params})
}
const removeBookFromMySelfApi = (id) =>{
	return minifetch.post("v2/pep/delShelf", {id})
}
const getOssApi = () =>{
	return minifetch.post("v1/getOssSecurityMini")
}
const updateAvarApi = (data) =>{
	return minifetch.post("v1/user/updateAvar", data)
}
const updateUserInfoApi = (data) =>{
	return minifetch.post("v1/user/updateUserInfo", data)
}
const getMyOrderApi = () =>{
	return minifetch.post("v2/pep/order")
}
const logOutApi = (data) =>{
	return minifetch.post("v1/loginOut", data)
}
const logOffApi = () =>{
	return minifetch.post("v1/logOff")
}
const getYunDuoToken = () =>{
	return minifetch.post("v2/pep/getToken")
}
const feedbackApi = (data) =>{
	return minifetch.post("v1/addFeedBack", data)
}
const outherLoginApi = (data) =>{
	return minifetch.post("v1/userLoginMini", data)
}

const getMpVersionApi = (data) =>{
	return minifetch.post("v1/iosExamineStuConfig", data)
}
const bindPhoneApi = (data) =>{
	return minifetch.post("v1/setPhone", data)
}


export {
	oneClickLoginApi,
	getUserInfoApi,
	getBannerApi,
	getMySelfApi,
	getYunDuoToken,
	getGradeListApi,
	getCourseListApi,
	getYunDuoBookListApi,
	addYunDuoBookApi,
	getPayBookInfoApi,
	buyBookApi,
	removeBookFromMySelfApi,
	getOssApi, 
	updateAvarApi, 
	updateUserInfoApi,
	getMyOrderApi,
	logOffApi,
	logOutApi,
	feedbackApi,
	outherLoginApi,
	getMpVersionApi,
	bindPhoneApi
}